# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
_pkgname=openwisp-utils
pkgname="py3-$_pkgname"
pkgver=1.0.0
pkgrel=0
pkgdesc="Python and Django utilities shared between different openwisp modules"
url="https://github.com/openwisp/openwisp-utils"
arch="noarch"
license="BSD-3-Clause"
depends="
	py3-django-compress-staticfiles
	py3-django-filter
	py3-django-model-utils
	py3-django-rest-framework
	py3-drf-yasg
	py3-swapper
	python3
"
checkdepends="
	py3-openwisp-controller
"
makedepends="py3-setuptools_scm"
source="$pkgname-$pkgver.tar.gz::https://github.com/openwisp/openwisp-utils/archive/refs/tags/$pkgver.tar.gz"
options="!check" # circular dependency caused by testing suite (controller <=> utils)
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	python3 runtests.py
}

package() {
	python3 setup.py install --root "$pkgdir"
}

sha512sums="
74931eab223688e47888f260614a43d29235bb26503ed54da62d2dc50b8276bc9bc31325bd3ca0c6c618e8902cc7314d63f824195c67b4303e42d1abdf5f1bc3  py3-openwisp-utils-1.0.0.tar.gz
"
